import {useNavigate,useSearchParams,useParams,useLocation} from 'react-router-dom'
const withRouter=(Rfc:any)=>{
    return (props:any)=>{   
        const navigate=useNavigate()
        const [query]=useSearchParams()
        const params=useParams()
        const {state}=useLocation()
        return<Rfc 
                navigate={navigate}
                query={query}
                params={params}
                state={state}
                {...props}></Rfc>
    }
}
export default withRouter